package CreationalPattern.Singleton.EasySingleton;

public class Singleton {
    private static Singleton instance = null;   // 静态私有成员变量

    // 私有构造函数
    private Singleton(){}

    // 静态公有方法，返回唯一示例
    public static Singleton getInstance() {
        if (instance == null) {
            instance = new Singleton();
        }
        return instance;
    }

}
